<?php

class CategoryModel extends AbstractModel
{

    protected $_children;

    protected function _init()
    {
	
    }

    public function setChildren(array $children)
    {
	$this->_children = $children;
    }

    public function getChildren()
    {
	return $this->_children;
    }

    public function addChild(CategoryModel $child)
    {
	if ($this->_children === null) {
	    $this->_children = array();
	}
	$this->_children[] = $child;
	return $this->_children;
    }

}